function checkAll(obj, name) //选择所有记录,所有行高亮 
{
    if (obj.checked == true) {
        $('input[name="' + name + '"]').attr('checked', true);
        $('#TbList tr').attr('class', 'table_list_row_selected');
    } else {
        $('input[name="' + name + '"]').removeAttr('checked');
        $('#TbList tr:odd').attr('class', 'table_list_row_normal');
        $('#TbList tr:even').attr('class', 'table_list_row_alert');
    }
    $('#TbList tr:first').attr('class', 'table_list_title');
}

$('#TbList tr:not(.table_list_title)').find('td:gt(0)').click(function() {
    var obj = $(this).parent();
    var input = obj.find('input').get(0);
    if (input.checked == true) {
        $(input).removeAttr('checked');
        var size = $('#TbList tr').index(obj);
        if (size % 2 == 0) {
            obj.attr('class', "table_list_row_alert");
        } else {
            obj.attr('class', "table_list_row_normal");
        }
    } else {
        input.checked = true;
        obj.attr('class', "table_list_row_selected");
    }
});
$('#TbList tr:gt(0)').find('input').click(function() {
    var obj = this;
    if (obj.checked == true) {
        $(obj).parent().parent().attr('class', "table_list_row_selected");
    } else {
        var size = $('#TbList tr').index($(obj).parent().parent());
        if (size % 2 == 0) {
            $(obj).parent().parent().attr('class', "table_list_row_alert");
        } else {
            $(obj).parent().parent().attr('class', "table_list_row_normal");
        }
    }
});

$('#TbList tr:even').attr('class','table_list_row_alert');
$('#TbList tr:first').attr('class','table_list_title');
